/*
 * @Author: your name
 * @Date: 2020-08-24 21:19:09
 * @LastEditTime: 2021-01-14 16:06:19
 * @LastEditors: 汪滔
 * @Description: In User Settings Edit
 * @FilePath: \xmgj-app-new\js\containers\logistics-platform\shipper-app\source\components\HandleBtn.js
 */
import React from 'react';
import { StyleSheet, Text, TouchableOpacity } from 'react-native';
import { px2dp } from '../../../../../common/styles';
/**
 * @author kanglang
 * @description 操作按钮
 * @createDate 2020/7/28
 */
export default function HandleBtn(
    { btnStyle, wordStyle, hendleTitle = "取消", handleBtn } = this.props
) {
    const submitBtn = (item) => {
        handleBtn(item);
    };
    return (
        <TouchableOpacity style={[styles.common, btnStyle]} onPress={submitBtn}>
            <Text style={wordStyle}>{hendleTitle}</Text>
        </TouchableOpacity>
    );
}
const styles = StyleSheet.create({
    common: {
        backgroundColor: '#FFFFFF',
        borderRadius: px2dp(4) * 2,
        borderColor: '#CDCCC9',
        borderWidth: px2dp(1),
        paddingTop: px2dp(4) * 2,
        paddingBottom: px2dp(4) * 2,
        paddingLeft: px2dp(22) * 2,
        paddingRight: px2dp(22) * 2,
        marginLeft: px2dp(8)*2

    },
});